package net.fdukedom.chart.helper;

import net.fdukedom.chart.Function2D;

public class FunctionLib {
	public static Function2D subtract(final Function2D f1, final Function2D f2) {
		return new Function2D() {
			public double value(double x, double y) {
				return f1.value(x, y) - f2.value(x, y);
			}
		};
	}
	
	public static Function2D constant(final double value) {
		return new Function2D() {
			public double value(double x, double y) {
				return value;
			}
		};
	}
	
}
